using Nop.Data.Mapping;
using Nop.Plugin.Widgets.Carousel.Domain;


namespace Nop.Plugin.Widgets.Carousel.Data
{
    public partial class CarouselEntityMap : NopEntityTypeConfiguration<CarouselEntity>
    {
        public CarouselEntityMap()
        {
            this.ToTable("Carousel_Entity_Mapping");
            this.HasKey(np => np.Id);

            this.HasRequired(np => np.Carousel)
                .WithMany(n => n.CarouselEntities)
                .HasForeignKey(np => np.CarouselId);
        }
    }
}